package cn.tedu.reflect;
//配合 测试 反射
public class Student {
    //构造方法-generate-constructor-多选ctrl/单选-ok
    public Student() {
        System.out.println(111);
    }

    public Student(String name) {
        this.name = name;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Student(String name, int age, double scoure) {
        this.name = name;
        this.age = age;
        this.scoure = scoure;
    }
//为了方便反射，不能是默认的修饰符，必须改成public
    public String name;
    public int age;
    public double scoure;

    public void study(){
        System.out.println("study()");
    }
    public void coding(String a,int b){
        System.out.println("coding()");
    }
    //重写的tostring（）--想看属性值而不是地址值

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", scoure=" + scoure +
                '}';
    }
}
